3.721 \(\int \frac{\cot ^8(c+d x) \csc ^4(c+d x)}{a+a \sin (c+d x)} \, dx\)

Optimal. Leaf size=194 \[ -\frac{\cot ^{11}(c+d x)}{11 a d}-\frac{2 \cot ^9(c+d x)}{9 a d}-\frac{\cot ^7(c+d x)}{7 a d}-\frac{3 \tanh ^{-1}(\cos (c+d x))}{256 a d}+\frac{\cot ^5(c+d x) \csc ^5(c+d x)}{10 a d}-\frac{\cot ^3(c+d x) \csc ^5(c+d x)}{16 a d}+\frac{\cot (c+d x) \csc ^5(c+d x)}{32 a d}-\frac{\cot (c+d x) \csc ^3(c+d x)}{128 a d}-\frac{3 \cot (c+d x) \csc (c+d x)}{256 a d} \]

[Out]

(-3*ArcTanh[Cos[c + d*x]])/(256*a*d) - Cot[c + d*x]^7/(7*a*d) - (2*Cot[c + d*x]^9)/(9*a*d) - Cot[c + d*x]^11/(
11*a*d) - (3*Cot[c + d*x]*Csc[c + d*x])/(256*a*d) - (Cot[c + d*x]*Csc[c + d*x]^3)/(128*a*d) + (Cot[c + d*x]*Cs
c[c + d*x]^5)/(32*a*d) - (Cot[c + d*x]^3*Csc[c + d*x]^5)/(16*a*d) + (Cot[c + d*x]^5*Csc[c + d*x]^5)/(10*a*d)

________________________________________________________________________________________

Rubi [A]  time = 0.252739, antiderivative size = 194, normalized size of antiderivative = 1., number of steps used = 10, number of rules used = 6, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.207, Rules used = {2839, 2607, 270, 2611, 3768, 3770} \[ -\frac{\cot ^{11}(c+d x)}{11 a d}-\frac{2 \cot ^9(c+d x)}{9 a d}-\frac{\cot ^7(c+d x)}{7 a d}-\frac{3 \tanh ^{-1}(\cos (c+d x))}{256 a d}+\frac{\cot ^5(c+d x) \csc ^5(c+d x)}{10 a d}-\frac{\cot ^3(c+d x) \csc ^5(c+d x)}{16 a d}+\frac{\cot (c+d x) \csc ^5(c+d x)}{32 a d}-\frac{\cot (c+d x) \csc ^3(c+d x)}{128 a d}-\frac{3 \cot (c+d x) \csc (c+d x)}{256 a d} \]

Antiderivative was successfully verified.

[In]

Int[(Cot[c + d*x]^8*Csc[c + d*x]^4)/(a + a*Sin[c + d*x]),x]

[Out]

(-3*ArcTanh[Cos[c + d*x]])/(256*a*d) - Cot[c + d*x]^7/(7*a*d) - (2*Cot[c + d*x]^9)/(9*a*d) - Cot[c + d*x]^11/(
11*a*d) - (3*Cot[c + d*x]*Csc[c + d*x])/(256*a*d) - (Cot[c + d*x]*Csc[c + d*x]^3)/(128*a*d) + (Cot[c + d*x]*Cs
c[c + d*x]^5)/(32*a*d) - (Cot[c + d*x]^3*Csc[c + d*x]^5)/(16*a*d) + (Cot[c + d*x]^5*Csc[c + d*x]^5)/(10*a*d)

Rule 2839

Int[((cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.))/((a_) + (b_.)*sin[(e_.) + (f_
.)*(x_)]), x_Symbol] :> Dist[g^2/a, Int[(g*Cos[e + f*x])^(p - 2)*(d*Sin[e + f*x])^n, x], x] - Dist[g^2/(b*d),
Int[(g*Cos[e + f*x])^(p - 2)*(d*Sin[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2
 - b^2, 0]

Rule 2607

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(b*x)
^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] &&  !(IntegerQ[(n
- 1)/2] && LtQ[0, n, m - 1])

Rule 270

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rule 2611

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(a*Sec[e
+ f*x])^m*(b*Tan[e + f*x])^(n - 1))/(f*(m + n - 1)), x] - Dist[(b^2*(n - 1))/(m + n - 1), Int[(a*Sec[e + f*x])
^m*(b*Tan[e + f*x])^(n - 2), x], x] /; FreeQ[{a, b, e, f, m}, x] && GtQ[n, 1] && NeQ[m + n - 1, 0] && Integers
Q[2*m, 2*n]

Rule 3768

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Csc[c + d*x])^(n - 1))/(d*(n -
 1)), x] + Dist[(b^2*(n - 2))/(n - 1), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1
] && IntegerQ[2*n]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int \frac{\cot ^8(c+d x) \csc ^4(c+d x)}{a+a \sin (c+d x)} \, dx &=-\frac{\int \cot ^6(c+d x) \csc ^5(c+d x) \, dx}{a}+\frac{\int \cot ^6(c+d x) \csc ^6(c+d x) \, dx}{a}\\ &=\frac{\cot ^5(c+d x) \csc ^5(c+d x)}{10 a d}+\frac{\int \cot ^4(c+d x) \csc ^5(c+d x) \, dx}{2 a}+\frac{\operatorname{Subst}\left (\int x^6 \left (1+x^2\right )^2 \, dx,x,-\cot (c+d x)\right )}{a d}\\ &=-\frac{\cot ^3(c+d x) \csc ^5(c+d x)}{16 a d}+\frac{\cot ^5(c+d x) \csc ^5(c+d x)}{10 a d}-\frac{3 \int \cot ^2(c+d x) \csc ^5(c+d x) \, dx}{16 a}+\frac{\operatorname{Subst}\left (\int \left (x^6+2 x^8+x^{10}\right ) \, dx,x,-\cot (c+d x)\right )}{a d}\\ &=-\frac{\cot ^7(c+d x)}{7 a d}-\frac{2 \cot ^9(c+d x)}{9 a d}-\frac{\cot ^{11}(c+d x)}{11 a d}+\frac{\cot (c+d x) \csc ^5(c+d x)}{32 a d}-\frac{\cot ^3(c+d x) \csc ^5(c+d x)}{16 a d}+\frac{\cot ^5(c+d x) \csc ^5(c+d x)}{10 a d}+\frac{\int \csc ^5(c+d x) \, dx}{32 a}\\ &=-\frac{\cot ^7(c+d x)}{7 a d}-\frac{2 \cot ^9(c+d x)}{9 a d}-\frac{\cot ^{11}(c+d x)}{11 a d}-\frac{\cot (c+d x) \csc ^3(c+d x)}{128 a d}+\frac{\cot (c+d x) \csc ^5(c+d x)}{32 a d}-\frac{\cot ^3(c+d x) \csc ^5(c+d x)}{16 a d}+\frac{\cot ^5(c+d x) \csc ^5(c+d x)}{10 a d}+\frac{3 \int \csc ^3(c+d x) \, dx}{128 a}\\ &=-\frac{\cot ^7(c+d x)}{7 a d}-\frac{2 \cot ^9(c+d x)}{9 a d}-\frac{\cot ^{11}(c+d x)}{11 a d}-\frac{3 \cot (c+d x) \csc (c+d x)}{256 a d}-\frac{\cot (c+d x) \csc ^3(c+d x)}{128 a d}+\frac{\cot (c+d x) \csc ^5(c+d x)}{32 a d}-\frac{\cot ^3(c+d x) \csc ^5(c+d x)}{16 a d}+\frac{\cot ^5(c+d x) \csc ^5(c+d x)}{10 a d}+\frac{3 \int \csc (c+d x) \, dx}{256 a}\\ &=-\frac{3 \tanh ^{-1}(\cos (c+d x))}{256 a d}-\frac{\cot ^7(c+d x)}{7 a d}-\frac{2 \cot ^9(c+d x)}{9 a d}-\frac{\cot ^{11}(c+d x)}{11 a d}-\frac{3 \cot (c+d x) \csc (c+d x)}{256 a d}-\frac{\cot (c+d x) \csc ^3(c+d x)}{128 a d}+\frac{\cot (c+d x) \csc ^5(c+d x)}{32 a d}-\frac{\cot ^3(c+d x) \csc ^5(c+d x)}{16 a d}+\frac{\cot ^5(c+d x) \csc ^5(c+d x)}{10 a d}\\ \end{align*}

Mathematica [A]  time = 2.93717, size = 187, normalized size = 0.96 \[ \frac{\left (\sin \left (\frac{1}{2} (c+d x)\right )+\cos \left (\frac{1}{2} (c+d x)\right )\right )^2 \left (-2661120 \left (\log \left (\cos \left (\frac{1}{2} (c+d x)\right )\right )-\log \left (\sin \left (\frac{1}{2} (c+d x)\right )\right )\right )-\cot (c+d x) \csc ^{10}(c+d x) (-3219678 \sin (c+d x)-2608452 \sin (3 (c+d x))-2181564 \sin (5 (c+d x))-121275 \sin (7 (c+d x))+10395 \sin (9 (c+d x))+9973760 \cos (2 (c+d x))+3543040 \cos (4 (c+d x))+343040 \cos (6 (c+d x))-61440 \cos (8 (c+d x))+5120 \cos (10 (c+d x))+6840320)\right )}{227082240 a d (\sin (c+d x)+1)} \]

Antiderivative was successfully verified.

[In]

Integrate[(Cot[c + d*x]^8*Csc[c + d*x]^4)/(a + a*Sin[c + d*x]),x]

[Out]

((Cos[(c + d*x)/2] + Sin[(c + d*x)/2])^2*(-2661120*(Log[Cos[(c + d*x)/2]] - Log[Sin[(c + d*x)/2]]) - Cot[c + d
*x]*Csc[c + d*x]^10*(6840320 + 9973760*Cos[2*(c + d*x)] + 3543040*Cos[4*(c + d*x)] + 343040*Cos[6*(c + d*x)] -
 61440*Cos[8*(c + d*x)] + 5120*Cos[10*(c + d*x)] - 3219678*Sin[c + d*x] - 2608452*Sin[3*(c + d*x)] - 2181564*S
in[5*(c + d*x)] - 121275*Sin[7*(c + d*x)] + 10395*Sin[9*(c + d*x)])))/(227082240*a*d*(1 + Sin[c + d*x]))

________________________________________________________________________________________

Maple [B]  time = 0.209, size = 436, normalized size = 2.3 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^8*csc(d*x+c)^12/(a+a*sin(d*x+c)),x)

[Out]

1/22528/d/a*tan(1/2*d*x+1/2*c)^11-1/10240/d/a*tan(1/2*d*x+1/2*c)^10-1/18432/d/a*tan(1/2*d*x+1/2*c)^9+1/4096/d/
a*tan(1/2*d*x+1/2*c)^8-5/14336/d/a*tan(1/2*d*x+1/2*c)^7+1/2048/d/a*tan(1/2*d*x+1/2*c)^6+1/2048/d/a*tan(1/2*d*x
+1/2*c)^5-1/512/d/a*tan(1/2*d*x+1/2*c)^4+5/3072/d/a*tan(1/2*d*x+1/2*c)^3-1/1024/d/a*tan(1/2*d*x+1/2*c)^2-5/102
4/d/a*tan(1/2*d*x+1/2*c)+1/10240/d/a/tan(1/2*d*x+1/2*c)^10+5/14336/d/a/tan(1/2*d*x+1/2*c)^7+5/1024/d/a/tan(1/2
*d*x+1/2*c)-1/22528/d/a/tan(1/2*d*x+1/2*c)^11-1/4096/d/a/tan(1/2*d*x+1/2*c)^8-1/2048/d/a/tan(1/2*d*x+1/2*c)^5+
1/512/d/a/tan(1/2*d*x+1/2*c)^4+1/18432/d/a/tan(1/2*d*x+1/2*c)^9+3/256/d/a*ln(tan(1/2*d*x+1/2*c))-1/2048/d/a/ta
n(1/2*d*x+1/2*c)^6-5/3072/d/a/tan(1/2*d*x+1/2*c)^3+1/1024/d/a/tan(1/2*d*x+1/2*c)^2

________________________________________________________________________________________

Maxima [B]  time = 1.13837, size = 641, normalized size = 3.3 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^8*csc(d*x+c)^12/(a+a*sin(d*x+c)),x, algorithm="maxima")

[Out]

-1/14192640*((69300*sin(d*x + c)/(cos(d*x + c) + 1) + 13860*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 - 23100*sin(d*
x + c)^3/(cos(d*x + c) + 1)^3 + 27720*sin(d*x + c)^4/(cos(d*x + c) + 1)^4 - 6930*sin(d*x + c)^5/(cos(d*x + c)
+ 1)^5 - 6930*sin(d*x + c)^6/(cos(d*x + c) + 1)^6 + 4950*sin(d*x + c)^7/(cos(d*x + c) + 1)^7 - 3465*sin(d*x +
c)^8/(cos(d*x + c) + 1)^8 + 770*sin(d*x + c)^9/(cos(d*x + c) + 1)^9 + 1386*sin(d*x + c)^10/(cos(d*x + c) + 1)^
10 - 630*sin(d*x + c)^11/(cos(d*x + c) + 1)^11)/a - 166320*log(sin(d*x + c)/(cos(d*x + c) + 1))/a - (1386*sin(
d*x + c)/(cos(d*x + c) + 1) + 770*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 - 3465*sin(d*x + c)^3/(cos(d*x + c) + 1)
^3 + 4950*sin(d*x + c)^4/(cos(d*x + c) + 1)^4 - 6930*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 - 6930*sin(d*x + c)^6
/(cos(d*x + c) + 1)^6 + 27720*sin(d*x + c)^7/(cos(d*x + c) + 1)^7 - 23100*sin(d*x + c)^8/(cos(d*x + c) + 1)^8
+ 13860*sin(d*x + c)^9/(cos(d*x + c) + 1)^9 + 69300*sin(d*x + c)^10/(cos(d*x + c) + 1)^10 - 630)*(cos(d*x + c)
 + 1)^11/(a*sin(d*x + c)^11))/d

________________________________________________________________________________________

Fricas [A]  time = 1.23436, size = 861, normalized size = 4.44 \begin{align*} \frac{20480 \, \cos \left (d x + c\right )^{11} - 112640 \, \cos \left (d x + c\right )^{9} + 253440 \, \cos \left (d x + c\right )^{7} - 10395 \,{\left (\cos \left (d x + c\right )^{10} - 5 \, \cos \left (d x + c\right )^{8} + 10 \, \cos \left (d x + c\right )^{6} - 10 \, \cos \left (d x + c\right )^{4} + 5 \, \cos \left (d x + c\right )^{2} - 1\right )} \log \left (\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right ) \sin \left (d x + c\right ) + 10395 \,{\left (\cos \left (d x + c\right )^{10} - 5 \, \cos \left (d x + c\right )^{8} + 10 \, \cos \left (d x + c\right )^{6} - 10 \, \cos \left (d x + c\right )^{4} + 5 \, \cos \left (d x + c\right )^{2} - 1\right )} \log \left (-\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right ) \sin \left (d x + c\right ) + 1386 \,{\left (15 \, \cos \left (d x + c\right )^{9} - 70 \, \cos \left (d x + c\right )^{7} - 128 \, \cos \left (d x + c\right )^{5} + 70 \, \cos \left (d x + c\right )^{3} - 15 \, \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{1774080 \,{\left (a d \cos \left (d x + c\right )^{10} - 5 \, a d \cos \left (d x + c\right )^{8} + 10 \, a d \cos \left (d x + c\right )^{6} - 10 \, a d \cos \left (d x + c\right )^{4} + 5 \, a d \cos \left (d x + c\right )^{2} - a d\right )} \sin \left (d x + c\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^8*csc(d*x+c)^12/(a+a*sin(d*x+c)),x, algorithm="fricas")

[Out]

1/1774080*(20480*cos(d*x + c)^11 - 112640*cos(d*x + c)^9 + 253440*cos(d*x + c)^7 - 10395*(cos(d*x + c)^10 - 5*
cos(d*x + c)^8 + 10*cos(d*x + c)^6 - 10*cos(d*x + c)^4 + 5*cos(d*x + c)^2 - 1)*log(1/2*cos(d*x + c) + 1/2)*sin
(d*x + c) + 10395*(cos(d*x + c)^10 - 5*cos(d*x + c)^8 + 10*cos(d*x + c)^6 - 10*cos(d*x + c)^4 + 5*cos(d*x + c)
^2 - 1)*log(-1/2*cos(d*x + c) + 1/2)*sin(d*x + c) + 1386*(15*cos(d*x + c)^9 - 70*cos(d*x + c)^7 - 128*cos(d*x
+ c)^5 + 70*cos(d*x + c)^3 - 15*cos(d*x + c))*sin(d*x + c))/((a*d*cos(d*x + c)^10 - 5*a*d*cos(d*x + c)^8 + 10*
a*d*cos(d*x + c)^6 - 10*a*d*cos(d*x + c)^4 + 5*a*d*cos(d*x + c)^2 - a*d)*sin(d*x + c))

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**8*csc(d*x+c)**12/(a+a*sin(d*x+c)),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 1.27398, size = 486, normalized size = 2.51 \begin{align*} \frac{\frac{166320 \, \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) \right |}\right )}{a} + \frac{630 \, a^{10} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{11} - 1386 \, a^{10} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{10} - 770 \, a^{10} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{9} + 3465 \, a^{10} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{8} - 4950 \, a^{10} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{7} + 6930 \, a^{10} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{6} + 6930 \, a^{10} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} - 27720 \, a^{10} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{4} + 23100 \, a^{10} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - 13860 \, a^{10} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 69300 \, a^{10} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )}{a^{11}} - \frac{502266 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{11} - 69300 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{10} - 13860 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{9} + 23100 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{8} - 27720 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{7} + 6930 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{6} + 6930 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} - 4950 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{4} + 3465 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - 770 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 1386 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 630}{a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{11}}}{14192640 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^8*csc(d*x+c)^12/(a+a*sin(d*x+c)),x, algorithm="giac")

[Out]

1/14192640*(166320*log(abs(tan(1/2*d*x + 1/2*c)))/a + (630*a^10*tan(1/2*d*x + 1/2*c)^11 - 1386*a^10*tan(1/2*d*
x + 1/2*c)^10 - 770*a^10*tan(1/2*d*x + 1/2*c)^9 + 3465*a^10*tan(1/2*d*x + 1/2*c)^8 - 4950*a^10*tan(1/2*d*x + 1
/2*c)^7 + 6930*a^10*tan(1/2*d*x + 1/2*c)^6 + 6930*a^10*tan(1/2*d*x + 1/2*c)^5 - 27720*a^10*tan(1/2*d*x + 1/2*c
)^4 + 23100*a^10*tan(1/2*d*x + 1/2*c)^3 - 13860*a^10*tan(1/2*d*x + 1/2*c)^2 - 69300*a^10*tan(1/2*d*x + 1/2*c))
/a^11 - (502266*tan(1/2*d*x + 1/2*c)^11 - 69300*tan(1/2*d*x + 1/2*c)^10 - 13860*tan(1/2*d*x + 1/2*c)^9 + 23100
*tan(1/2*d*x + 1/2*c)^8 - 27720*tan(1/2*d*x + 1/2*c)^7 + 6930*tan(1/2*d*x + 1/2*c)^6 + 6930*tan(1/2*d*x + 1/2*
c)^5 - 4950*tan(1/2*d*x + 1/2*c)^4 + 3465*tan(1/2*d*x + 1/2*c)^3 - 770*tan(1/2*d*x + 1/2*c)^2 - 1386*tan(1/2*d
*x + 1/2*c) + 630)/(a*tan(1/2*d*x + 1/2*c)^11))/d